<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/6/21 0021
 * Time: 下午 14:04
 */

if(!defined('ROOT_PATH')){//view目录的上一级目录
    define('ROOT_PATH',dirname(dirname(__FILE__)).'/' );
}
error_reporting(0);

if(!defined('IS_DEBUG')){
    define('IS_DEBUG',true );
}
require(ROOT_PATH.'/config/config.php');
require_once(LIB_PATH."/myframe.php");//框架
mysafe::setCron();//设置为crontab模式

$from = myrequest::getReferer();
$request = new myrequest();
$router  = new myrouter($request);
$router->setCon('sms'); //设置控制器
$router->setAct('promotion'); //设置act

require_once($router->getControllerFile());
$objName = $router->getControllerName();
$obj = new $objName($request);
$actName = $router->getActName();
$obj->$actName($request);